<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>寻蜜鸟--商户</title>
<link href="css/css2.css" type="text/css" rel="stylesheet" />
<link rel="stylesheet" href="http://res.layui.com/lay/lib/layer/src/skin/layer.css" >
<link rel="stylesheet" href="http://res.layui.com/lay/lib/layer/src/skin/layer.ext.css" >
<style type="text/css">
.tdbj{
	position: fixed;
	z-index: 9998;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: #C4E1E1;
	opacity: 0.6;
}
</style>
</head>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/layer1.9.3/layer.js"></script>
<script type="text/javascript" src="js/mypage/jquery.myPagination.js"></script>
<script type="text/javascript" src="js/jquery.form.js"></script>
<script type="text/javascript" src="js/drawImage.js"></script>
<script type="text/javascript" src="js/foodManage.js"></script>
<body>
<input type="hidden" name="aid" id="aid" value="${aid}" />
<div class="wrap">
  <div class="container">
    <div class="content">
      <div class="infor">
        <div class="cpgl-box">
          <div class="cptitle">
            <h2>菜品管理</h2>
          </div>
	          <div class="cpaddbrns">
	            <a href="javascript:void(0)"  id="addFoodClass" class="fl addbtn">添加</a>
	            <a href="javascript:void(0)"  id="delBatchFoodClass" class="fl delbtn">批量删除</a>
	          </div>
	          <div class="cpgldatabox">
	            <ul class="cpgldatatitle">
	              <li class="fl">分类名称</li>
	              <li class="fl">菜品数</li>
	              <li class="fl">操作</li>
	            </ul>
          		<div id="pagediv"></div>
				<!-- 分页 -->
				<div class="page">
					<div class="page-num">
						 <a href="javascript:getCurrPage(1)"><img src="img/ago_page.png" /></a>
						 <a href="javascript:getCurrPage(2)" class="prev" id="prev"><img src="img/ago.png" /> 上一页</a>
						 <!-- 动态追加 <a href="#" class="on">1</a>--> 
						 <a href="javascript:getCurrPage(3)" class="next">下一页<img src="img/next.png" /></a> 
						 <a href="javascript:getCurrPage(4)"><img src="img/next-page.png" /></a> 
						 <span class="skip"> 	
						 	<input type="text" class="text" id="myPage"> 
						 	<a class="btn" style="cursor: pointer;"  onclick="javascript:gotoMyPage()">GO</a>
						 </span>
					</div>
					<input type="hidden" name="pageCount" id="pageCount" value="0"/>
					<input type="hidden" name="currentPage" id="currentPage" value="${currentPage}"/>
					<input type="hidden" name="currentPage" id="sellerid" value="${sellerid}"/>
					<input type="hidden" name="aid" id="aid" value='${aid}'/>
			 	</div>
	         </div>
	       </div>
	     </div>
	    </div>
        <!-- 确定删除 -->
        <div class="tdpopup hide" id="delete" >
          <div class="tdbj"></div>
          <div class="tdmain cdmain">
            <h3 class="tdtitle">确认删除
              <span></span>
            </h3>
            <p class="ts">是否确定删除</p>
            <div class="cppopupbtn">
              <a href="javascript:void(0)" class="a">确定</a>
              <a href="javascript:void(0)" class="b">取消</a>
            </div>
          </div>
        </div>
        <!-- 添加分类 -->
        <div class="tdpopup hide" id="addFoodClassDiv" >
         <div class="tdbj"></div>
          <div class="tdmain cdmain">
            <h3 class="tdtitle">添加分类
              <span></span>
            </h3>
            <div class="ts">
              <span>分类名称:</span>
              <input type="text" class="tstext" id="addFoodClassName" placeholder="请输入10个字以内的名称">
            </div>
            <div class="cppopupbtn">
              <a href="javascript:void(0)"  id="saveFoodClassBtn"  class="a">确定</a>
            </div>
          </div>
        </div>
        <!-- 编辑分类 -->
        <div class="tdpopup hide"  id="modifyFoodClassDiv">
         <input type="hidden"  id="fcid"  />
          <div class="tdbj"></div>
          <div class="tdmain cdmain">
            <h3 class="tdtitle">编辑分类
              <span></span>
            </h3>
            <div class="ts">
              <span>分类名称:</span>
              <input type="text" class="tstext"  id="modifyFoodClassName" placeholder="请输入10个字以内的名称">
            </div>
            <div class="cppopupbtn">
              <a href="javascript:void(0)"  id="modifyFoodClassBtn"  class="a">确定</a>
            </div>
          </div>
        </div>
        <!-- 编辑菜品 -->
        <div class="tdpopup hide"  id="modifyFoodDiv">
          <input type="hidden"  id="foodid" />	
          <!--   //此处的菜品类别ID用于 在更新菜品的菜品类别属性后 刷新原来类别中的数据显示 -->
          <input type="hidden"  id="oldfoodclassid" />	 
          <div class="tdbj"></div>
          <div class="tdmain cdmain">
            <h3 class="tdtitle"><label id="foodtitle">编辑菜品</label>
              <span></span>
            </h3>
            <div class="ts tssp">
              <ul>
                <li>
                  <div class="fl">
                    <span class="fl">菜品类别：</span>
                    <select id="foodclassid">
                    </select>
                  </div>
                  <div class="fl" id="datastatusDiv" >
                    <span class="fl" >菜品状态：</span>
                    <select id="datastatus">
                      <option value="1">上架</option>
                      <option value="3">下架</option>
                    </select>
                  </div>
                </li>
                <li>
                  <span class="fl">编号：</span><label  id="num"></label>
                </li>
                <li>
                  <div class="fl">
                    <span class="fl">菜品名称：</span>
                    <input type="text" class="tstext" id="foodname" name="foodname" placeholder="请输入10个字以内的名称">
                  </div>
                  <div class="fl">
                    <span class="fl">菜品价格：￥</span>
                    <input type="text" class="tstext" id="cprice" name="cprice" placeholder="请输入大于0的数字"  onkeyup="value=value.replace(/[^\d.]/g,'') " onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d.]/g,''))" />
                  </div>
                </li>
                <li>
                  <div>
                  	<!-- 图片路径的字段隐藏域 -->
                   <input type="hidden"  id="fileUrl" />
                   <input type="hidden"  id="imgUrl" />   
                   <input type="hidden"  id="breUrl" />   
                    <span class="fl">图 片：</span>
	                    <div class="fl">
	                      <div class="filebox" style="width:100%">
	                      	<img class="imgpic" style="width:84px;height:86px;float:left" onload="DrawImage(this)" />
	                     	 <!-- 屏蔽掉删除图片的图标 -->	
	                      	 <!--  <img onclick="fordelimg()" class="delimgs" src="img/delImg.png" style="cursor: pointer;width:15px;height:15px;position:relative;left:70px;top:-90px;"/> -->
	                     	 <form id="form1" name="form1" enctype="multipart/form-data" method="post" style="float:left;">  
								<div id="picsub" style="width:89px;height:86px;background: url(img/upload.png);float:left;">
								  <input type="file" id="bigpic" name="bigpic" style="float:left;opacity:0;width:89px;height:86px;filter:alpha(opacity=0);"/>
								</div>
								<input type="hidden" id="token" name="token" value="1"/>
							</form>
	                      </div>
	                      <input id="atag" type="checkbox" />设为广告位
	                    </div>
                  </div>
                </li>
              </ul>
            </div>
            <div class="cppopupbtn">
              <a href="javascript:void(0)" class="a" id="saveFoodBtn" >保存</a>
            </div>
          </div>
        </div>
      </div>
    </div>
</body>
</html>

